<!--********************************************************************
* Copyright© 2000 - 2025 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title data-i18n="resources.title_tiledMapLayer_rasterfunction"></title>
    <script type="text/javascript" src="../js/include-web.js"></script>
  </head>
  <body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
    <div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
    <script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
    <script type="text/javascript">
      var map,
        url = 'https://iserver.supermap.io/iserver/services/map-ndvi/rest/maps/hainanImage';
      map = L.map('map', {
        center: L.CRS.EPSG3857.unproject(L.point(12189483.19 , 2155290.02)),
        maxZoom: 12,
        zoom: 12
      });
      new L.supermap
        .TiledMapLayer(url, {
          cacheEnabled: false,
          format:'jpg',
          rasterfunction: new L.supermap.NDVIParameter({ redIndex: 0, nirIndex: 2 })
        })
        .addTo(map);
    </script>
  </body>
</html>
